/**
 * 
 */
package core;

import core.QuestionPattern.Level;
import db.IQuestionsDb;

/**
 * @author Boaz
 *To be extended by a different classes that generate different type of questions from different resources
 */
public abstract class QuestionGenerator {
	
	protected static final int NUMBEROFWRONGANSWERS = 3;
	
	//	every extending class must be able to generate a new question 
	public abstract Question generateNewQuestion(IQuestionsDb db, Level level);

	//	every extending class must be able to be updated by a question instance for statistics purposes
	public abstract void aQuestionHasBeenAnswered(int questionId, boolean correctly);
	
	//	every extending class must be able to update the DB with new statistics over the questions it has been using
	public abstract void updateQuestionsStatisticsInDb(IQuestionsDb db);

	public static enum Wildcard{
		CONTINENT("Continent"),
		COUNTRY("Country"),
		REGION("Region"),
		CITY("City"),
		CURRENCY("Currency"),
		CAPITAL("Capital"),
		LANGUAGE("Language"),
		UNEMPLOYMENT("Unemployment"),
		INFLATION("Inflation"),
		FOUNDED("Founded"),
		REVENUE("Revenue"),
		DENSITY("Density"),
		TLD("TLD"),
		AREA("Area"),
		PEOPLE("People");


		private final String text;
		private Wildcard(String text){
			this.text = text;
		}

		@Override
		public String toString(){
			return this.text;
		}
	}




}
	
	
